﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GeneratorLib.DB;

namespace DBExplorer
{
    public partial class NewDBPrivoder : Form
    {

        public NewDBPrivoder()
        {
            InitializeComponent();
        }

        public IDBProvider SelectDBProvider(IList<IDBProvider> DBProviders)
        {
            listBox1.DataSource = DBProviders;
            if (ShowDialog() == DialogResult.OK)
            {
                return (IDBProvider)listBox1.SelectedItem;
            }
            return null;
        }

        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }

    }
}
